package com.wnxy.producer.d_topic;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class TopicProducer {
    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void sendMsg(String exchange,String routingKey, String msg) {
        rabbitTemplate.convertAndSend(exchange,routingKey,msg);
    }
}
